<template>
  <div>
    <el-input v-model="id"></el-input>
    <el-button @click="login1">保存</el-button>

    <section class="step-section">
      <span>1、</span>
      <span>pom.xml文件：</span>
      <span>spring-boot-starter-aop</span>
    </section>
    <section class="step-section">
      <span>2、</span>
      <span>Application启动类：</span>
      <span>@EnableAspectJAutoProxy(exposeProxy = true)</span>
    </section>
    <section class="step-section">
      <span>3、</span>
      <span>核心代码：</span>
      <span>TransactionalPropagationServiceImpl transactionalPropagationService = (TransactionalPropagationServiceImpl) AopContext.currentProxy();</span>
    </section>
  </div>
</template>

<script>
import API from '@/api/transactionalpropagation'
export default {
  name: 'transactionalpropagation',
  data () {
    return {
        id: 1
    }
  },
  methods: {
    login1 () {
      API.login1({id: this.id}).then(res => {
        this.$message.success(`操作成功！`)
      }).catch(e => {
        this.$message.error(`error:${e.message}`)
      }).finally(() => {

      })
    }
  }
}
</script>

<style lang="less" scoped>
.step-section{
  font-size: 16px;
  font-weight: bold;
}
</style>
